package com.hxtec.polaris.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @Author Marcus lv
 * @create 2019/11/28 5:54 下午
 */
@Entity
@Table(name = "shop_category", schema = "hx_tec_shop", catalog = "")
public class ShopCategoryEntity {
    private String id;
    private String parentId;
    private String isParent;
    private String name;
    private String decriptsion;
    private String image;
    private Double weight;
    private Integer goodsCount;
    private String state;
    private String isDelete;
    private Timestamp createTime;
    private Timestamp updateTime;
    private String comment1;
    private String comment2;
    private String comment3;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "parent_id")
    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    @Basic
    @Column(name = "is_parent")
    public String getIsParent() {
        return isParent;
    }

    public void setIsParent(String isParent) {
        this.isParent = isParent;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "decriptsion")
    public String getDecriptsion() {
        return decriptsion;
    }

    public void setDecriptsion(String decriptsion) {
        this.decriptsion = decriptsion;
    }

    @Basic
    @Column(name = "image")
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Basic
    @Column(name = "weight")
    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    @Basic
    @Column(name = "goods_count")
    public Integer getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(Integer goodsCount) {
        this.goodsCount = goodsCount;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "is_delete")
    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "comment1")
    public String getComment1() {
        return comment1;
    }

    public void setComment1(String comment1) {
        this.comment1 = comment1;
    }

    @Basic
    @Column(name = "comment2")
    public String getComment2() {
        return comment2;
    }

    public void setComment2(String comment2) {
        this.comment2 = comment2;
    }

    @Basic
    @Column(name = "comment3")
    public String getComment3() {
        return comment3;
    }

    public void setComment3(String comment3) {
        this.comment3 = comment3;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ShopCategoryEntity that = (ShopCategoryEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
        if (isParent != null ? !isParent.equals(that.isParent) : that.isParent != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (decriptsion != null ? !decriptsion.equals(that.decriptsion) : that.decriptsion != null) return false;
        if (image != null ? !image.equals(that.image) : that.image != null) return false;
        if (weight != null ? !weight.equals(that.weight) : that.weight != null) return false;
        if (goodsCount != null ? !goodsCount.equals(that.goodsCount) : that.goodsCount != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (isDelete != null ? !isDelete.equals(that.isDelete) : that.isDelete != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (comment1 != null ? !comment1.equals(that.comment1) : that.comment1 != null) return false;
        if (comment2 != null ? !comment2.equals(that.comment2) : that.comment2 != null) return false;
        if (comment3 != null ? !comment3.equals(that.comment3) : that.comment3 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (parentId != null ? parentId.hashCode() : 0);
        result = 31 * result + (isParent != null ? isParent.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (decriptsion != null ? decriptsion.hashCode() : 0);
        result = 31 * result + (image != null ? image.hashCode() : 0);
        result = 31 * result + (weight != null ? weight.hashCode() : 0);
        result = 31 * result + (goodsCount != null ? goodsCount.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (isDelete != null ? isDelete.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (comment1 != null ? comment1.hashCode() : 0);
        result = 31 * result + (comment2 != null ? comment2.hashCode() : 0);
        result = 31 * result + (comment3 != null ? comment3.hashCode() : 0);
        return result;
    }
}
